package com.heima.safe.aliyun.mq;

import com.heima.safe.aliyun.verify.VerifyImage;

import java.awt.image.ImageFilter;
import java.util.List;
import java.util.Map;
import java.util.concurrent.Callable;

/**
 * @author mgw
 * @create 2021/10/6 20:33
 */
public class ImagesFutureResp implements Callable<List<Map<String, String>>> {
    private Map<String,Object> dataMap;
    private VerifyImage verifyImage;

    public ImagesFutureResp(Map<String, Object> dataMap, VerifyImage verifyImage) {
        this.dataMap = dataMap;
        this.verifyImage = verifyImage;
    }

    @Override
    public List<Map<String, String>> call() throws Exception {
        List<String> images=(List<String>) dataMap.get("images");
        if (images!=null&&images.size()>0){
            return verifyImage.verify(images);
        }
        return null;
    }
}
